package com.demo.design.behavioral.mediator.impl;

import com.demo.design.behavioral.mediator.Colleague;
import com.demo.design.behavioral.mediator.Mediator;

public class LowanColleague extends Colleague {

    public LowanColleague(Mediator mediator) {
        super(mediator);
        if (name == null || "".equals(name)) {
            name = "lowan" + (System.currentTimeMillis() % 1000000);
        }
    }

    public LowanColleague(String name, Mediator mediator) {
        super(name, mediator);
    }

    @Override
    public void getNotice(String msg) {
        System.err.println(name + "获得了消息:" + msg);
        System.err.println(name + "很高兴");
    }


}
